package com.google.code.maven.instrument.util;

import java.io.File;
import java.io.FileFilter;

import org.apache.commons.io.filefilter.FileFilterUtils;

public class ClassFileFilter implements FileFilter {

	FileFilter suffixFilter = FileFilterUtils.suffixFileFilter(".class");
	FileFilter fileFilter = FileFilterUtils.fileFileFilter();

	@Override
	public boolean accept(final File pathname) {
		return pathname.exists() && suffixFilter.accept(pathname)
				&& fileFilter.accept(pathname);
	}

}
